package com.nmsl.medicine.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.medicine.mapper.MedicineManufacturerMapper;
import com.nmsl.medicine.domain.MedicineManufacturer;
import com.nmsl.medicine.service.IMedicineManufacturerService;

/**
 * 药品生产厂家Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-14
 */
@Service
public class MedicineManufacturerServiceImpl implements IMedicineManufacturerService 
{
    @Autowired
    private MedicineManufacturerMapper medicineManufacturerMapper;

    /**
     * 查询药品生产厂家
     * 
     * @param manufacturerId 药品生产厂家主键
     * @return 药品生产厂家
     */
    @Override
    public MedicineManufacturer selectMedicineManufacturerByManufacturerId(Long manufacturerId)
    {
        return medicineManufacturerMapper.selectMedicineManufacturerByManufacturerId(manufacturerId);
    }

    /**
     * 查询药品生产厂家列表
     * 
     * @param medicineManufacturer 药品生产厂家
     * @return 药品生产厂家
     */
    @Override
    public List<MedicineManufacturer> selectMedicineManufacturerList(MedicineManufacturer medicineManufacturer)
    {
        return medicineManufacturerMapper.selectMedicineManufacturerList(medicineManufacturer);
    }

    /**
     * 新增药品生产厂家
     * 
     * @param medicineManufacturer 药品生产厂家
     * @return 结果
     */
    @Override
    public int insertMedicineManufacturer(MedicineManufacturer medicineManufacturer)
    {
        return medicineManufacturerMapper.insertMedicineManufacturer(medicineManufacturer);
    }

    /**
     * 修改药品生产厂家
     * 
     * @param medicineManufacturer 药品生产厂家
     * @return 结果
     */
    @Override
    public int updateMedicineManufacturer(MedicineManufacturer medicineManufacturer)
    {
        return medicineManufacturerMapper.updateMedicineManufacturer(medicineManufacturer);
    }

    /**
     * 批量删除药品生产厂家
     * 
     * @param manufacturerIds 需要删除的药品生产厂家主键
     * @return 结果
     */
    @Override
    public int deleteMedicineManufacturerByManufacturerIds(Long[] manufacturerIds)
    {
        return medicineManufacturerMapper.deleteMedicineManufacturerByManufacturerIds(manufacturerIds);
    }

    /**
     * 删除药品生产厂家信息
     * 
     * @param manufacturerId 药品生产厂家主键
     * @return 结果
     */
    @Override
    public int deleteMedicineManufacturerByManufacturerId(Long manufacturerId)
    {
        return medicineManufacturerMapper.deleteMedicineManufacturerByManufacturerId(manufacturerId);
    }
}
